Adding a Range Field to a Form

You can provide the range of values by using the range type of the input field. You can use the <input type=”range”> tag, which is used to specify the range of values, in an HTML document. Along with this, you can set the range of numerical value with the min and max attributes. In order words, the range input type represents the input of limited range numerical values. On a Web page, the range field is displayed as a slider control, which can be easily scrolled horizontally to move the pointer between the minimum and maximum values.

Let’s do the following steps to add a range field.


<!DOTYPE html>
<head>
    <title>Adding a Range Field</title>
</head>
<body>
<center>
    <h2>Example of Range Field </h2>
    <form>
        <input type=”range” name=”rangeno” min=”0” max=”20” value=”1” title=”slider” />
    </form>
</center>
</body>
</html>

Save the document with the name AddingRange.html and open on browser.